Skip to content

Update Attribute to include "Type" and "Defalut value" as children - #5439

Merged
Eric Harvey (eharvey328) merged 34 commits into
mainfrom
emh/refactor-attributes
Aug 19, 2026
Merged

Eric Harvey (eharvey328) merged 34 commits into
mainfrom
emh/refactor-attributes

Conversation

@eharvey328

@eharvey328 Eric Harvey (eharvey328) commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor
  • removes attributeTypeHint and attributeTypeHintHref props on Attribute mdx component.

    • now the type and default value are added to the body as markdown to be parsed in docs
    • allows multiple types with multiple links this way (e.g., method: QiskitType | dict[Qiskititem] | None)
    • this also makes it so hrefs get automatically transformed by the pipeline since they are no longer a prop string
  • did not implement an ignore list for links to python standard types because these links are already display in other places in the docs. If we want we can handle in a follow up.

Packages migrated:

Package Version
qiskit 2.5.2 (latest), 2.6.0-dev (dev)
qiskit-ibm-runtime 0.49.0 (latest), 0.50.0-dev (dev)
pauli-props 0.2.0 (latest)
qiskit-addon-aqc-tensor 0.3.1 (latest)
qiskit-addon-cutting 0.10.0 (latest)
qiskit-addon-mpf 0.3.0 (latest)
qiskit-addon-obp 0.3.0 (latest)
qiskit-addon-paulice 0.2.1 (latest)
qiskit-addon-pna 0.2.0 (latest)
qiskit-addon-slc 0.1.0 (latest)
qiskit-addon-sqd 0.13.1 (latest)
qiskit-addon-utils 0.4.0 (latest)

@eharvey328
Eric Harvey (eharvey328) marked this pull request as ready for review August 6, 2026 14:18
@eharvey328 Eric Harvey (eharvey328) changed the title refactor attributes Update Attribute to include "Type" and "Defalut value" as children Aug 6, 2026
@eharvey328

Eric Harvey (eharvey328) commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Axel Hernández Ferrera (@axelhzf) I got the inline-code styling to work

The challenge is the source does not output these as inline-code blocks so we have to add them somewhere.
But we can't just wrap the entire thing because we lose the links

`[Value](href) | [Another](href)` // links becomes a string

We need to parse each token individually:

[`Value`](href) | [`Another`](href)

That works for the type, but default value can have complex values with spaces and chars:

Default value:  \<default case>

Since this represents a value, it is safe to assume there won't be any type def links. So we can wrap the whole thing in a code block

@eharvey328
Eric Harvey (eharvey328) added this pull request to the merge queue Aug 19, 2026
Merged via the queue into main with commit 96ba18b Aug 19, 2026
4 checks passed
@eharvey328
Eric Harvey (eharvey328) deleted the emh/refactor-attributes branch August 19, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants